﻿<%@ Control Language="C#" AutoEventWireup="true" EnableViewState="false" CodeBehind="MercList.ascx.cs" Inherits="ZF.WS.UserControls.Index.MercList" %>
    <%@ Register src="PopularizeCompany.ascx" tagname="PopularizeCompany" tagprefix="uc1" %>
    <%@ Register src="fAds.ascx" tagname="fAds" tagprefix="uc2" %>
    <style>
        .buyhelp dt{ line-height:30px; font-size:14px; color:#2072AC;  background:#E1E2E4; padding-left:30px; font-weight:bold;}
        .buyhelp dd{ padding-left:20px; border-bottom:1px dashed #eee; line-height:26px;  background:url(/image/bp.gif) no-repeat 15px 10px ;  }
        </style>
 
<div class="ct1 content"> 
<div class="fl_"  style="width:710px;">
    <div class="board merclist mt10_">
        <dl>
            <dt>
                <a href="/shop/list.aspx" class="t"> 
                    家居商城</a>
                <zf:ListView runat="server" ID="lvTitle">
                    <LayoutTemplate>
                        <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                        </zf:PlaceHolder>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <a href="/shop/list.aspx?Ptid=<%#Eval("Key") %>" class="<%# Container.DataItemIndex==0?"active":"dn_" %> slide"
                            bind="merc<%#Eval("Key") %>">
                            <%#Eval("Text") %></a>
                    </ItemTemplate>
                </zf:ListView>
                <a href="/shop/list.aspx" class="more">更多>>></a> </dt>
            <zf:ListView runat="server" ID="lvList">
                <LayoutTemplate>
                    <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                    </zf:PlaceHolder>
                </LayoutTemplate>
                <ItemTemplate>
                    <dd class="slide merc<%#Eval("Key") %> <%# Container.DataItemIndex==0?"active":"dn_" %> autoSizeImgC">
                        <zf:ListView ID="ListView1" runat="server" DataSource='<%#Eval("Value") %>'>
                            <LayoutTemplate>
                                <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                                </zf:PlaceHolder>
                            </LayoutTemplate>
                            <ItemTemplate>
                                <%# Container.DataItemIndex%5==0?" <ul>":"" %>
                                <li>
                                    <ol>
                                        <li style=" display: table-cell; height:120px; width:120px;border: 1px solid #eee; vertical-align:middle;"><a href="/shop/info.aspx?id=<%#Eval("Merc.MerchandiseId") %>" >
                                        
                                        
                                            <img src="/photo/shop/<%#Eval("Photo")!=null?Eval("Photo"):"noimage.gif" %>" class="photo autoSizeImg" style="vertical-align:middle;"  
                                                alt="" /></a> </li>
                                        <li><a href="/shop/info.aspx?id=<%#Eval("Merc.MerchandiseId") %>">
                                            <%#((string)Eval("Merc.Name")).MaxLength(10)%></a></li>
                                            
                                        <li style="text-align:left">&nbsp;价&nbsp;&nbsp;格：<span  ><%#(int)(decimal)Eval("Merc.CPrice")%>元</span></li>
                                        
                                        <%--<li style="text-align:left">会员价：<span  ><%#(int)(decimal)Eval("Merc.MPrice")%>元+<%#Eval("Merc.Integral")%>积分</span></li>--%>
                                        <%--<li style="text-align:left">&nbsp;库&nbsp;&nbsp;存：<span  ><%#Eval("Merc.Quantity")%><%#Eval("Merc.Unit")%></span></li>--%>
                                        <li><a href="/shop/buy.aspx?id=<%#Eval("Merc.MerchandiseId") %>">
                                            <img src="/image/spbuy.gif" /></a> <a href="/shop/info.aspx?id=<%#Eval("Merc.MerchandiseId") %>">
                                                <img src="/image/spinfo.gif" /></a> </li>
                                    </ol>
                                </li>
                                <%# Container.DataItemIndex % 5 == 4 ? "</ul>" : ""%>
                            </ItemTemplate>
                        </zf:ListView>
                    </dd>
                </ItemTemplate>
            </zf:ListView>
        </dl>
    </div> 
 
      
    <uc1:PopularizeCompany ID="PopularizeCompany1" runat="server" />
     
    </div>
    <div class="lrcontent ml10_ mt10_">
        <div class="b1  buyhelp" style="padding: 5px 2px;">
            <dl>
                <dt>新手指南</dt>
                <dd>
                    <a href="/tools/lc.aspx?id=2">购物流程</a></dd>
                <dd>
                    <a href="/tools/jytk.aspx">交易条款</a></dd>
            </dl>
        </div>
        <div class="board mrecsearch lrsearch mt10_">
            <dl>
                <dt><span>商品搜索</span> </dt>
                <dd>
                    <table class="w100_  ">
                        <tr class="dt">
                            <td class='t'>
                                一级类别:
                            </td>
                            <td class='c'>
                                <select class="ddl pt">
                                    <option value="0">--不限--</option>
                                    <zf:ListView runat="server" ID="lvPType">
                                        <LayoutTemplate>
                                            <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                                            </zf:PlaceHolder>
                                        </LayoutTemplate>
                                        <ItemTemplate>
                                            <option value="<%#Eval("Key") %>">
                                                <%#Eval("Text") %></option>
                                        </ItemTemplate>
                                    </zf:ListView>
                                </select>
                            </td>
                        </tr>
                        <tr class="dt">
                            <td class='t'>
                                二级类别:
                            </td>
                            <td class='c'>
                                <select class="ddl ct">
                                    <option value='0'>--不限--</option>
                                </select>
                            </td>

                            <script>
                                var types = $.evalJSON('<zf:Literal runat="server" ID="litTypeJson"></zf:Literal>');
                            </script>

                            <script>
                                function setCType(value) {
                                    $(".ct option").remove();
                                    $(".ct").append("<option value='0'>--不限--</option>");
                                    $(types).each(function() {
                                        if (this.ParentId + "" == value && value != 0) {
                                            $(".ct").append(String.format("<option value='{0}'>{1}</option>", this.Key, this.Text));
                                        }
                                    });
                                }
                                $(function() {
                                    $(".pt").change(function() {
                                        setCType(this.value);
                                    });
                                });
                                setCType($(".pt")[0].value);
                            </script>

                        </tr>
                        <tr>
                            <td class='t'>
                                价格范围:
                            </td>
                            <td class='c'>
                                <input type="text" class="sstxt pmin" />-<input type="text" class="sstxt pmax" />
                            </td>
                        </tr>
                        <tr>
                            <td class='t'>
                                关键字:
                            </td>
                            <td class='c'>
                                <input type="text" class="stxt key" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="text-align: center">
                                <input type="button" value=" 搜 索 " class="btSearch" />
                            </td>
                        </tr>
                    </table>
                </dd>
            </dl>

            <script>
                $(function() {
                    var mrecsearch = $(".mrecsearch");
                    mrecsearch.find(".btSearch").click(function() {
                        var param = "1=1";
                        if (mrecsearch.find(".ct")[0].value != "0")
                            param += "&ctid=" + mrecsearch.find(".ct")[0].value;
                        if (mrecsearch.find(".pt")[0].value != "0")
                            param += "&ptid=" + mrecsearch.find(".pt")[0].value;
                        if ($.trim(mrecsearch.find(".pmin").val()) != "")
                            param += "&pmin=" + $.trim(mrecsearch.find(".pmin").val());
                        if ($.trim(mrecsearch.find(".pmax").val()) != "")
                            param += "&pmax=" + $.trim(mrecsearch.find(".pmax").val());
                        if ($.trim(mrecsearch.find(".key").val()) != "")
                            param += "&key=" + escape(mrecsearch.find(".key").val());
                        window.location = "/shop/list.aspx?" + param;

                    });
                });
            </script>

        </div>
        
        
        <div class="board   artlist mt5_">
            <dl>
                <dt><a  href="/info/lFitup.aspx?tid=2">最新优惠</a> <a href="/info/lFitup.aspx?tid=2"  class="more">更多>></a> </dt>
                <zf:ListView runat="server" ID="lvFitup">
                    <LayoutTemplate>
                        <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                        </zf:PlaceHolder>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <dd>
                            <a href="/info/fitup.aspx?id=<%#Eval("FitupId")%>&tid=<%#Eval("TypeId")%>">
                                <%# ((string)Eval("Title")).MaxLength(16) %></a></dd>
                    </ItemTemplate>
                </zf:ListView>
   
            </dl>
            
        </div>
         <uc2:fAds ID="fAds1" runat="server"  Index="4"/>
         
        <style>
            .mercHot dl dd { height:72px;*height: auto;}
            .mercHot li { padding: 2px 0px; }
            .mercHot li.l { width: 85px; float: left; }
            .mercHot li.l img { width: 100%; height: auto; }
            .mercHot li.r { width: 120px; float: left; padding-left: 5px; text-align: left; }
            .mercHot li.r img { width: 52px; height: 18px; }
            .mercHot li.r p { height: 70px;*height: auto; color: #F00; text-align: left; }
            .mercHot li span { color: #3366CC; }
        </style>
        <div class="board mercHot mt10_ autoSizeImgC dn_">
            <dl>
                <dt><span>热销商品</span> <a href="/shop/list.aspx" class="more">更多>></a> </dt>
                <zf:ListView runat="server" ID="lvHot">
                    <LayoutTemplate>
                        <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                        </zf:PlaceHolder>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <dd>
                            <ul>
                                <li class="l" style="height:55px; width:55px;border: 1px solid #eee;" ><a href="/shop/info.aspx?id=<%#Eval("Merc.MerchandiseId") %>">
                                    <img src="/photo/shop/<%#Eval("Merc.FirstPhoto")!=null?Eval("Merc.FirstPhoto"):"noimage.gif" %>"
                                        alt="" class="autoSizeImg" />
                                </a></li>
                                <li class="r">
                                    <p>
                                        <span>品名：</span> <a href="/shop/info.aspx?id=<%#Eval("Merc.MerchandiseId") %>">
                                            <%#((string) Eval("Merc.Name")).MaxLength(16)%></a>
                                        <br />
                                        <span>价格：</span> <a href="info.aspx?id=<%#Eval("Merc.MerchandiseId") %>">
                                            <%#Eval("Merc.CPrice")%>元</a><br />
                                        <a href="/shop/buy.aspx?id=<%#Eval("Merc.MerchandiseId") %>">
                                            <img src="/image/spbuy.gif" /></a> <a href="/shop/info.aspx?id=<%#Eval("Merc.MerchandiseId") %>">
                                                <img src="/image/spinfo.gif" /></a>
                                    </p>
                                </li>
                            </ul>
                        </dd>
                    </ItemTemplate>
                </zf:ListView>
            </dl>
        </div>
        <style>
            .tjjm dd { line-height: 22px; }
        </style>
        <div class="board   tjjm mt3_ dn_">
            <a href="/service/scjm.aspx">
                <img src="/image/gm1.gif" style=" height:100px; width:100%"/></a>
            <%--  <dl>
                <dt>
                    <p>
                        家居商城加盟
                    </p>
                </dt>
                <dd>
                    &nbsp;&nbsp;&nbsp;&nbsp;本着互惠互利的精神，家居用品生产商可加盟本商城，生产厂商提供商品资料，确保商品质量，本网络负责推广销售。
                    <br />
                    加盟热线：<span class="fc2">13312818081</span>
                    <br>
                    电子邮箱：<span class="fc2">13312818081@163.com</span></dd></dl>--%>
        </div>
    </div>
     
    <div class="fc_">
    </div>
 
</div>


     